const { getBuildOrder, execCmd } = require("./utils");

async function main() {
  const cmdlist = (await getBuildOrder()).map((name) => `npm run build --workspace=${name}`);
  for (const cmd of cmdlist) {
    console.log(cmd);
    await execCmd(cmd);
  }
}

main().catch((err) => console.error(err));
